/* 整体聊天容器样式 */
.chat-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  height: 100vh;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb); /* 冷色调渐变背景，从浅蓝到浅青 */
  transition: background-color 0.5s ease-in-out;
}

/* 工具栏样式 */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  background: rgba(30, 144, 255, 0.3); /* 半透明的道奇蓝背景 */
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 工具栏按钮样式 */
.toolbar-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 16px;
  color: #fff;
  background-color: #1e90ff; /* 道奇蓝 */
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.toolbar-button:hover {
  background-color: #1c86ee; /* 更深的道奇蓝 */
  transform: translateY(-3px);
}

.toolbar-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.5);
}

/* 聊天气泡通用样式 */
.chat-bubble {
  max-width: 70%;
  padding: 12px 18px;
  border-radius: 15px;
  margin-bottom: 10px;
  word-wrap: break-word;
  font-size: 16px;
  line-height: 1.4;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.chat-bubble:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 用户消息气泡 */
.user-bubble {
  background-color: #89cff0; /* 浅蓝色 */
  color: #fff;
  align-self: flex-end;
  border-top-right-radius: 0;
}

/* 助手消息气泡 */
.assistant-bubble {
  background-color: #add8e6; /* 浅蓝色更柔和 */
  color: #fff;
  align-self: flex-start;
  border-top-left-radius: 0;
  position: relative;
}

/* 助手消息气泡箭头 */
.assistant-bubble::after {
  content: '';
  position: absolute;
  top: 10px;
  left: -10px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-right: 10px solid #add8e6; /* 与气泡背景色一致 */
  border-bottom: 10px solid transparent;
}

/* 点赞和踩按钮的选中状态 */
.active-good {
  color: #00ced1; /* 深青色，代表点赞 */
}

.active-bad {
  color: #ff69b4; /* 热粉色，代表踩 */
}

/* 聊天输入框底部样式 */
.chat-footer {
  display: flex;
  align-items: center;
  background: #f0f8ff; /* 爱丽丝蓝 */
  padding: 10px 20px;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

/* 输入框及操作按钮的样式 */
.footer-actions {
  display: flex;
  gap: 10px;
  margin-left: 16px;
}

/* 聊天窗口的背景颜色 */
.chat-window {
  background: #f8f9fa; /* 淡灰色 */
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  overflow-y: auto;
  transition: background-color 0.3s;
}

/* 修改字体和输入框样式 */
.t-chat-input {
  padding: 10px 16px;
  border-radius: 30px;
  border: 2px solid #1e90ff; /* 道奇蓝边框 */
  background-color: #fff;
  transition: border-color 0.3s;
}

.t-chat-input:focus {
  border-color: #00ced1; /* 深青色焦点效果 */
}

/* 发送按钮样式 */
.send-button {
  background-color: #1e90ff; /* 道奇蓝 */
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-button:hover {
  background-color: #1c86ee;
  transform: scale(1.05);
}

/* 表情按钮样式 */
.emoji-button {
  background-color: #20b2aa; /* 浅海洋绿 */
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-button:hover {
  background-color: #2e8b57; /* 海洋绿 */
  transform: scale(1.05);
}

/* 反馈对话框样式 */
.feedback-dialog {
  .t-dialog__header {
    background-color: #1e90ff; /* 道奇蓝头部 */
    color: #ffffff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    font-size: 20px;
    text-align: center;
  }

  .t-dialog__body {
    padding: 30px;
    background-color: #e6f2ff; /* 浅蓝色背景 */
    display: flex;
    flex-direction: column;
    gap: 25px;
  }

  .t-dialog__footer {
    background-color: #e6f2ff;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
  }
}

.submit-feedback-button {
  background-color: #00ced1; /* 深青色 */
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 12px 24px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submit-feedback-button:hover {
  background-color: #20b2aa;
}

.cancel-feedback-button {
  background-color: #696969; /* 暗灰色 */
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 12px 24px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.cancel-feedback-button:hover {
  background-color: #808080;
}

.feedback-textarea {
  width: 100%;
  border: 1px solid #1e90ff;
  border-radius: 8px;
  padding: 14px 24px;
  resize: vertical;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.feedback-textarea:hover,
.feedback-textarea:focus {
  border-color: #00ced1;
}

/* 分享对话框样式 */
.share-dialog {
  .t-dialog__header {
    background-color: #20b2aa; /* 浅海洋绿头部 */
    color: #ffffff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    font-size: 20px;
    text-align: center;
  }

  .t-dialog__body {
    padding: 30px;
    background-color: #e0ffff; /* 淡青色背景 */
    display: flex;
    flex-direction: column;
    gap: 25px;
  }

  .t-dialog__footer {
    background-color: #e0ffff;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
  }
}

.share-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.share-text-input {
  width: 100%;
  height: 130px;
  border: 1px solid #1e90ff;
  border-radius: 8px;
  padding: 14px 24px;
  font-size: 16px;
  resize: vertical;
  transition: border-color 0.3s;
}

.share-text-input:hover,
.share-text-input:focus {
  border-color: #00ced1;
  outline: none;
}

.share-image-upload {
  width: 100%;
  display: flex;
  justify-content: center;
}

.image-preview {
  position: relative;
  width: 100%;
  max-height: 250px;
  overflow: hidden;
  border-radius: 8px;
  margin-top: 20px;
}

.image-preview img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.remove-image-button {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  padding: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.remove-image-button:hover {
  background-color: rgba(255, 255, 255, 1);
}

.submit-share-button {
  background-color: #00ced1; /* 深青色 */
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 14px 28px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submit-share-button:hover {
  background-color: #20b2aa;
}

/* 下载对话框样式 */
.download-dialog {
  .t-dialog__header {
    background-color: #1e90ff; /* 道奇蓝头部 */
    color: #ffffff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    font-size: 20px;
    text-align: center;
  }

  .t-dialog__body {
    padding: 30px;
    background-color: #e6f2ff; /* 浅蓝色背景 */
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: center;
  }

  .t-dialog__footer {
    background-color: #e6f2ff;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    display: flex;
    justify-content: center;
    gap: 20px;
  }
}

.download-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.confirm-download-button {
  background-color: #1e90ff; /* 道奇蓝 */
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 14px 28px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.confirm-download-button:hover {
  background-color: #1c86ee;
}

.cancel-download-button {
  background-color: #696969; /* 暗灰色 */
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 14px 28px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.cancel-download-button:hover {
  background-color: #808080;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .chat-container {
    grid-template-columns: 1fr;
    grid-template-rows: 60px 1fr;
  }

  .toolbar {
    display: none; /* 隐藏侧边栏 */
  }

  .toolbar {
    justify-content: center;
    gap: 12px;
  }

  .chat-window {
    border-radius: 0;
  }

  .chat-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .footer-actions {
    margin-left: 0;
    justify-content: center;
  }

  .chat-input {
    width: 100%;
  }

  .send-button,
  .emoji-button {
    width: 35px;
    height: 35px;
  }
}
